#ifndef CONTAINEDNODE_H_
#define CONTAINEDNODE_H_

#include <irrlicht.h>

class ContainedNode {
	protected:
		float m_width, m_height;
		float m_offset;
		irr::scene::ISceneNode* m_parent;
		irr::scene::ISceneManager* m_sceneManager;
	public:
		ContainedNode(irr::scene::ISceneNode* parent, float offset, float w, float h, irr::scene::ISceneManager* scn) :
		m_width(w), m_height(h), m_offset(offset), m_parent(parent), m_sceneManager(scn) {
		}
		
		irr::core::vector3df getLocalPosition() {
			irr::core::vector3df tmpvec = m_parent->getAbsolutePosition();
			tmpvec.Y+= m_offset;
			return tmpvec;
		}
		
		virtual void updateLocation() = 0;

		virtual ~ContainedNode() {
		}
};

#endif /*CONTAINEDNODE_H_*/
